import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/AddKeRoom',
      name: 'AddKeRoom',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/KeRoom/AddKeRoom.vue'),
    },
    {
      path: '/ShowKeRoom',
      name: 'ShowKeRoom',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/KeRoom/ShowKeRoom.vue'),
    },
    {
      path: '/UpdKeRoom/:kid',
      name: 'UpdKeRoom',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/KeRoom/UpdKeRoom.vue'),
    },
    {
      path: '/Login',
      name: 'Login',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/BingRoom/Login.vue'),
    },
    {
      path: '/AddBingRoom',
      name: 'AddBingRoom',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/BingRoom/AddBingRoom.vue'),
    },
    {
      path: '/ShowBingRoom',
      name: 'ShowBingRoom',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/BingRoom/ShowBingRoom.vue'),
    },
    {
      path: '/AddDocater',
      name: 'AddDocater',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Docater/AddDocater.vue'),
    },
    {
      path: '/ShowDocater',
      name: 'ShowDocater',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Docater/ShowDocater.vue'),
    },
    {
      path: '/KanDocater/:id',
      name: 'KanDocater',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/Docater/KanDocater.vue'),
    },
  ],
})

export default router
